package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ClusterInfoId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ClusterInfoId implements java.io.Serializable {

	// Fields

	private Integer majorId;
	private Integer minorId;
	private Integer ownerId;
	private Integer firstClass;
	private Integer seconClass;
	private Integer thirdClass;
	private String title;
	private String note;
	private String bulletin;
	private Integer maxMember;
	private Integer security;
	private Integer accessPower;
	private String passwd;
	private long createTime;
	private long modifyTime;
	private Integer flags;
	private long space;
	private Integer corpId;

	// Constructors

	/** default constructor */
	public ClusterInfoId() {
	}

	/** minimal constructor */
	public ClusterInfoId(String title, String note, String bulletin,
			Integer maxMember, Integer security, Integer accessPower,
			String passwd, long createTime, long modifyTime, Integer flags) {
		this.title = title;
		this.note = note;
		this.bulletin = bulletin;
		this.maxMember = maxMember;
		this.security = security;
		this.accessPower = accessPower;
		this.passwd = passwd;
		this.createTime = createTime;
		this.modifyTime = modifyTime;
		this.flags = flags;
	}

	/** full constructor */
	public ClusterInfoId(Integer majorId, Integer minorId, Integer ownerId,
			Integer firstClass, Integer seconClass, Integer thirdClass,
			String title, String note, String bulletin, Integer maxMember,
			Integer security, Integer accessPower, String passwd,
			long createTime, long modifyTime, Integer flags, long space,
			Integer corpId) {
		this.majorId = majorId;
		this.minorId = minorId;
		this.ownerId = ownerId;
		this.firstClass = firstClass;
		this.seconClass = seconClass;
		this.thirdClass = thirdClass;
		this.title = title;
		this.note = note;
		this.bulletin = bulletin;
		this.maxMember = maxMember;
		this.security = security;
		this.accessPower = accessPower;
		this.passwd = passwd;
		this.createTime = createTime;
		this.modifyTime = modifyTime;
		this.flags = flags;
		this.space = space;
		this.corpId = corpId;
	}

	// Property accessors

	@Column(name = "major_id")
	public Integer getMajorId() {
		return this.majorId;
	}

	public void setMajorId(Integer majorId) {
		this.majorId = majorId;
	}

	@Column(name = "minor_id")
	public Integer getMinorId() {
		return this.minorId;
	}

	public void setMinorId(Integer minorId) {
		this.minorId = minorId;
	}

	@Column(name = "owner_id")
	public Integer getOwnerId() {
		return this.ownerId;
	}

	public void setOwnerId(Integer ownerId) {
		this.ownerId = ownerId;
	}

	@Column(name = "first_class")
	public Integer getFirstClass() {
		return this.firstClass;
	}

	public void setFirstClass(Integer firstClass) {
		this.firstClass = firstClass;
	}

	@Column(name = "secon_class")
	public Integer getSeconClass() {
		return this.seconClass;
	}

	public void setSeconClass(Integer seconClass) {
		this.seconClass = seconClass;
	}

	@Column(name = "third_class")
	public Integer getThirdClass() {
		return this.thirdClass;
	}

	public void setThirdClass(Integer thirdClass) {
		this.thirdClass = thirdClass;
	}

	@Column(name = "title", nullable = false, length = 64)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "note", nullable = false, length = 16777215)
	public String getNote() {
		return this.note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	@Column(name = "bulletin", nullable = false, length = 16777215)
	public String getBulletin() {
		return this.bulletin;
	}

	public void setBulletin(String bulletin) {
		this.bulletin = bulletin;
	}

	@Column(name = "max_member", nullable = false)
	public Integer getMaxMember() {
		return this.maxMember;
	}

	public void setMaxMember(Integer maxMember) {
		this.maxMember = maxMember;
	}

	@Column(name = "security", nullable = false)
	public Integer getSecurity() {
		return this.security;
	}

	public void setSecurity(Integer security) {
		this.security = security;
	}

	@Column(name = "access_power", nullable = false)
	public Integer getAccessPower() {
		return this.accessPower;
	}

	public void setAccessPower(Integer accessPower) {
		this.accessPower = accessPower;
	}

	@Column(name = "passwd", nullable = false, length = 20)
	public String getPasswd() {
		return this.passwd;
	}

	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}

	@Column(name = "create_time", nullable = false)
	public long getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}

	@Column(name = "modify_time", nullable = false)
	public long getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(long modifyTime) {
		this.modifyTime = modifyTime;
	}

	@Column(name = "flags", nullable = false)
	public Integer getFlags() {
		return this.flags;
	}

	public void setFlags(Integer flags) {
		this.flags = flags;
	}

	@Column(name = "space")
	public long getSpace() {
		return this.space;
	}

	public void setSpace(long space) {
		this.space = space;
	}

	@Column(name = "corp_id")
	public Integer getCorpId() {
		return this.corpId;
	}

	public void setCorpId(Integer corpId) {
		this.corpId = corpId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ClusterInfoId))
			return false;
		ClusterInfoId castOther = (ClusterInfoId) other;

		return ((this.getMajorId() == castOther.getMajorId()) || (this
				.getMajorId() != null && castOther.getMajorId() != null && this
				.getMajorId().equals(castOther.getMajorId())))
				&& ((this.getMinorId() == castOther.getMinorId()) || (this
						.getMinorId() != null && castOther.getMinorId() != null && this
						.getMinorId().equals(castOther.getMinorId())))
				&& ((this.getOwnerId() == castOther.getOwnerId()) || (this
						.getOwnerId() != null && castOther.getOwnerId() != null && this
						.getOwnerId().equals(castOther.getOwnerId())))
				&& ((this.getFirstClass() == castOther.getFirstClass()) || (this
						.getFirstClass() != null
						&& castOther.getFirstClass() != null && this
						.getFirstClass().equals(castOther.getFirstClass())))
				&& ((this.getSeconClass() == castOther.getSeconClass()) || (this
						.getSeconClass() != null
						&& castOther.getSeconClass() != null && this
						.getSeconClass().equals(castOther.getSeconClass())))
				&& ((this.getThirdClass() == castOther.getThirdClass()) || (this
						.getThirdClass() != null
						&& castOther.getThirdClass() != null && this
						.getThirdClass().equals(castOther.getThirdClass())))
				&& ((this.getTitle() == castOther.getTitle()) || (this
						.getTitle() != null && castOther.getTitle() != null && this
						.getTitle().equals(castOther.getTitle())))
				&& ((this.getNote() == castOther.getNote()) || (this.getNote() != null
						&& castOther.getNote() != null && this.getNote()
						.equals(castOther.getNote())))
				&& ((this.getBulletin() == castOther.getBulletin()) || (this
						.getBulletin() != null
						&& castOther.getBulletin() != null && this
						.getBulletin().equals(castOther.getBulletin())))
				&& ((this.getMaxMember() == castOther.getMaxMember()) || (this
						.getMaxMember() != null
						&& castOther.getMaxMember() != null && this
						.getMaxMember().equals(castOther.getMaxMember())))
				&& ((this.getSecurity() == castOther.getSecurity()) || (this
						.getSecurity() != null
						&& castOther.getSecurity() != null && this
						.getSecurity().equals(castOther.getSecurity())))
				&& ((this.getAccessPower() == castOther.getAccessPower()) || (this
						.getAccessPower() != null
						&& castOther.getAccessPower() != null && this
						.getAccessPower().equals(castOther.getAccessPower())))
				&& ((this.getPasswd() == castOther.getPasswd()) || (this
						.getPasswd() != null && castOther.getPasswd() != null && this
						.getPasswd().equals(castOther.getPasswd())))
				&& (this.getCreateTime() == castOther.getCreateTime())
				&& (this.getModifyTime() == castOther.getModifyTime())
				&& ((this.getFlags() == castOther.getFlags()) || (this
						.getFlags() != null && castOther.getFlags() != null && this
						.getFlags().equals(castOther.getFlags())))
				&& (this.getSpace() == castOther.getSpace())
				&& ((this.getCorpId() == castOther.getCorpId()) || (this
						.getCorpId() != null && castOther.getCorpId() != null && this
						.getCorpId().equals(castOther.getCorpId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMajorId() == null ? 0 : this.getMajorId().hashCode());
		result = 37 * result
				+ (getMinorId() == null ? 0 : this.getMinorId().hashCode());
		result = 37 * result
				+ (getOwnerId() == null ? 0 : this.getOwnerId().hashCode());
		result = 37
				* result
				+ (getFirstClass() == null ? 0 : this.getFirstClass()
						.hashCode());
		result = 37
				* result
				+ (getSeconClass() == null ? 0 : this.getSeconClass()
						.hashCode());
		result = 37
				* result
				+ (getThirdClass() == null ? 0 : this.getThirdClass()
						.hashCode());
		result = 37 * result
				+ (getTitle() == null ? 0 : this.getTitle().hashCode());
		result = 37 * result
				+ (getNote() == null ? 0 : this.getNote().hashCode());
		result = 37 * result
				+ (getBulletin() == null ? 0 : this.getBulletin().hashCode());
		result = 37 * result
				+ (getMaxMember() == null ? 0 : this.getMaxMember().hashCode());
		result = 37 * result
				+ (getSecurity() == null ? 0 : this.getSecurity().hashCode());
		result = 37
				* result
				+ (getAccessPower() == null ? 0 : this.getAccessPower()
						.hashCode());
		result = 37 * result
				+ (getPasswd() == null ? 0 : this.getPasswd().hashCode());
		result = 37 * result + (int) this.getCreateTime();
		result = 37 * result + (int) this.getModifyTime();
		result = 37 * result
				+ (getFlags() == null ? 0 : this.getFlags().hashCode());
		result = 37 * result + (int) this.getSpace();
		result = 37 * result
				+ (getCorpId() == null ? 0 : this.getCorpId().hashCode());
		return result;
	}

}